package 作业1022.zuoye1;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Market m =new Market();
        m.name="国购";
        m.address="官亭路";
        int choice=0;
        while (true){

            System.out.println("1,添加员工，2，涨积分，3兑换礼品，4输出信息，5退出");
            choice =in.nextInt();
            if (choice==1){
                Member me =new Member();
                System.out.println("请输入姓名");
                me.name=in.next();
                System.out.println("请输入会员号");
                me.membernum=in.next();
                System.out.println("请输入手机号");
                me.phonenum  = in.next();
                System.out.println("输入积分");
                me.jifen=in.nextInt();
                m.add(me);

            }
            if (choice==2){
                System.out.println("输入要涨积分的会员号");
                String membernum1=in.next();
                System.out.println("输入要涨的积分");
                int jifen1=in.nextInt();
                boolean b=m.inc(membernum1,jifen1);

            }
            if (choice==3){
                System.out.println("请依次输入会员号：");
                String membernum = in.next();
                System.out.println("请依次输入兑换选项：");
                System.out.println("1：100分兑换餐巾纸一包；\n" + "2：400分兑换剃须刀一把；\n" + "3：1000分兑换炒锅一个；");
                int choice1 = in.nextInt();
                m.duihuan(membernum,choice1);


            }
            if (choice==4){
                m.show();
            }
            if(choice==5){
                break;
            }
        }
        System.out.println("结束了");
    }
}
